package com.jeasonzhao.report.engine.demo;

import com.jeasonzhao.report.engine.ReportUserInfo;
import com.jeasonzhao.report.engine.impl.AbstractSessionUserProvider;

public class DemoUserProvider extends AbstractSessionUserProvider
{
    public DemoUserProvider()
    {
        super("");
    }

    protected void fillUserProperties(ReportUserInfo user,Object sessionObject)
    {
        if(null != sessionObject && null != user)
        {
            user.setId(sessionObject.toString());
            user.setName(sessionObject.toString());
            user.setAdministrator(user.getId().equalsIgnoreCase("admin"));
        }
    }
}
